import request from '@/utils/request'

// get 获得推荐课程列表数据
export function getRecommendedCoursesList(params) {
  return request({
    url: '/ops/recommendedCourses/list',
    method: 'get',
    params
  })
}

// post 新增推荐课程列表数据
export function addRecommend(data) {
  return request({
    url: '/ops/recommendedCourses/add',
    method: 'post',
    data
  })
}

// post 修改推荐课程列表数据
export function updateRecommend(data) {
  return request({
    url: '/ops/recommendedCourses/update',
    method: 'post',
    data
  })
}

// get 删除推荐课程列表数据
export function deleteRecommend(params) {
  return request({
    url: '/ops/recommendedCourses/delete',
    method: 'get',
    params: { id: params }
  })
}

// get 获得首页配置项数据
export function getPageConfig(params) {
  return request({
    url: '/ops/pageConfig/get',
    method: 'get',
    params: { tenantId: params }
  })
}

// post 修改首页配置项数据
export function updatePageConfig(data) {
  return request({
    url: '/ops/pageConfig/update',
    method: 'post',
    data
  })
}

// get 获得广告设置数据
export function getAdvertiseConfig(params) {
  return request({
    url: '/ops/advertiseConfig/get',
    method: 'get',
    params: { tenantId: params }
  })
}

// get 修改广告设置数据
export function updateAdvertiseConfig(data) {
  return request({
    url: '/ops/advertiseConfig/update',
    method: 'post',
    data
  })
}
